home *** CD-ROM | disk | FTP | other *** search
- rem $linesize:132
- rem $title:'Application Engineer Standard Routines'
- rem $subtitle:'Mark the status flag on a file to OPEN'
- ' Include the COMMON values
- rem $include:'AESHARED.BAS'
-
- sub Mark.File.Open(fl%,rlen%) static
-
- field #fl%,1 as stat$,2 as n.av$,2 as l.av$,1 as mj$,1 as mn$,1 as bug.fix$
- field #fl%,8 as dummy$,r% as filler$
-
- ' stat$ = Status (1 = Open / 2 = Closed)
- ' n.av$ = Next available record
- ' l.av$ = Last available record
- ' mj$ = Application Engineer Major release version
- ' mn$ = Application Engineer Minor release version
- ' bug.fix$ = Bug fix code within Minor release
-
- get #fl%,1%
-
- if mj$<>chr$(0%) or _
- mn$<>chr$(0%) or _
- bug.fix$<>"B" _
- then
- call ae.error("MFO Version mismatch error. Action 01")
- end if
-
- st%=asc(stat$)
-
-
- if st%=2% then ' File is closed, lets open
- lset stat$=chr$(1%) ' Value for file OPEN
- put #fl%,1%
- elseif st%=1% then ' File is open ! Probably corrupt
- call ae.error("MFO File not previously closed properly. Action 05")
- else ' Corrupt through other means
- call ae.error("MFO File is corrupt. Action 06")
- end if
- end sub